package cn.ulc.store.amiExt;

import cn.ulc.common.constant.enums.DeletedStatus;
import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.mapper.MapperInvoke;

import java.lang.reflect.Method;

public class FindByIdAndDeletedAmiExt implements MapperInvoke {

    @Override
    public Object call(SQLManager sqlManager, Class aClass, String s, Method method, Object[] objects) {
//        BaseModel baseModel = (BaseModel)objects[0];
        return sqlManager.lambdaQuery(aClass).andEq("id",objects[0]).andEq("deleted", DeletedStatus.UN_DELETED).single();
//        return null;
    }

}
